package com.jiayinlending.jiayindai.adapter;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.myrepay.LoanDetailsActivity;
import com.jiayinlending.jiayindai.adapter.base.BaseRecyclerViewAdapter;
import com.jiayinlending.jiayindai.adapter.viewholder.MyLoanRecylerHolder;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.List;

/**
 * Created by xiaohei on 2017/4/14.
 */

public class MyLoanRecylerAdpater extends BaseRecyclerViewAdapter<MyLoanRecylerHolder, Info> {


    public MyLoanRecylerAdpater(Context context, List<Info> data) {
        super(context, data);
    }

    @Override
    public MyLoanRecylerHolder onCreateViewHolder(final ViewGroup parent, int viewType) {
        View view = View.inflate(parent.getContext(), R.layout.activity_my_loan_item, null);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(parent.getContext(), LoanDetailsActivity.class);
                context.startActivity(intent);
            }
        });
        return new MyLoanRecylerHolder(view);
    }

    @Override
    public void onBindViewHolder(MyLoanRecylerHolder holder, int position) {

    }

}
